package bTree.LeetCode;

public class H指数 {
    public int hIndex(int[] citations) {
        int length=citations.length;
        int max=0;
        for(int i=1;i<=length;i++){
            int path=0;
            for(int j=0;j<length;j++){
                if(citations[j]>=i){
                    path++;
                }
            }
            if(path>=i){
                max=i;
            }else{
                break;
            }

        }
        return max;
    }
}